import request from '@/utils/request'

// 首页页面：
// 获取-全部分类(包含推荐商品)
export const getCategoryService = () => request.get('/home/category/head')
// 获取-轮播图数据
export const getBannerService = (params = {}) => {
  // 默认为1  ，商品为2
  // 解构
  const { distributionSite = '1' } = params
  return request.get('/home/banner', {
    params: {
      distributionSite,
    },
  })
}

// 获取-新鲜好物
export const getNewGoodsService = () => request.get('/home/new')
// 获取-人气推荐
export const getHotRecommendService = () => request.get('/home/hot')
// 获取-产品列表
export const getGoodsProductService = () => request.get('/home/goods')
